-- GENERATED SPELL FOR [Deathshadow Overlord] --


function spell0_22393(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22393', 3000, 1)
end

function spell1_22393(pUnit, Event) --@Impending Doom,n/a--
pUnit:FullCastSpellOnTarget(37579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22393', 30000, 1)
end

function spell2_22393(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15232,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22393', 3000, 1)
end

function Sorts_22393(pUnit, Event)
local choix_sorts_22393 = math.random(0, 2)
if choix_sorts_22393 == 0 then
pUnit:RegisterEvent('spell0_22393', 1, 1)
end
if choix_sorts_22393 == 1 then
pUnit:RegisterEvent('spell1_22393', 1, 1)
end
if choix_sorts_22393 == 2 then
pUnit:RegisterEvent('spell2_22393', 1, 1)
end
end

function mob22393_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22393', math.random(1500, 3000), 1)
end

function mob22393_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22393_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22393_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22393, 1, 'mob22393_Action')
RegisterUnitEvent(22393, 2, 'mob22393_Leave')
RegisterUnitEvent(22393, 3, 'mob22393_Kill')
RegisterUnitEvent(22393, 4, 'mob22393_Die')
